//#include "BaseGameEntity.h"

/*
class testMesh: public BaseGameEntity {
private:
	double X;
	double Y;
	double Z;
public:
	testMesh(){
	OGLBaseGameEntity::OGLBaseGameEntity ();
	X=5;
	Y=3;
	Z=9;
}
}
*/
/*
using namespace std;
class CPolygon {
  protected:
    int width, height;
  public:
    void set_values (int a, int b)
      { width=a; height=b;}
  };

class CRectangle: public CPolygon {
  public:
    int area ()
      { return (width * height); }
  };

class CTriangle: public CPolygon {
  public:
    int area ()
      { return (width * height / 2); }
  };
  
int main () {
  CRectangle rect;
  CTriangle trgl;
  vector <CRectangle> rectA (1);
  rect.set_values (4,5);
  trgl.set_values (4,5);
  cout << rect.area() << endl;
  cout << trgl.area() << endl;
  rectA[0].area()<< endl;

  return 0;
}
*/

/*Evertime I try to make the nextID static (see OGLBaseGameEntity.h) I get linker issues
So if you notice below, I tried passing an incorrect value to the constructor in player3
but it still sets it to that value. This is because each value as it is instantiated creates a new 
nextID. A static Next ID would make it global (I believe) so it could be updated. However this doesn't 
work for me. You guys are welcome to try it out, if not, we'll just have to make some sort of global number
that we increase upon each objects creation
Other than that, the vector seems to work, I'll start working on a SceneManager now
*/
#include <iostream>
#include <vector>
#include "OGLBaseGameEntity.h"
using namespace std;
class Player: public OGLBaseGameEntity{
private:
	float posX;
	float posY;
	float posZ;
public:
	Player();
	Player::Player(int Nid)
		:OGLBaseGameEntity(Nid)
	{
		posX =2.0;
		posY =3.0;
		posZ =1.0;
	}
	void showPos(){
		cout<<"posX: "<<posX<<" posY: "<<posY<<"posZ: "<<posZ<<endl<<endl<<endl;
	}
	void setPos(float x, float y, float z){
		posX= x;
		posY= y;
		posZ= z;
	}
};


int main(){
	OGLBaseGameEntity *base = new OGLBaseGameEntity(0);
	cout<<"Base ID is: ";
	cout<<base->getID(*base)<<endl<<endl<<endl;
	Player *player1 = new Player(1);
	cout<<"Player ID is: ";
	cout<<player1->getID(*player1)<<endl;
	player1->showPos();
	cout<<endl<<endl;


	Player *player2 = new Player(2);
	cout<<"Player 2 ID is: ";
	cout<<player2->getID(*player2)<<endl;
	player2->showPos();

	Player *player3 = new Player(1);
	cout<<"player 3 ID is: ";
	cout<<player3->getID(*player3)<<endl;
	player3->showPos();


	vector<Player> playerList;
	
	player1->setPos(9.0,12.0, 14.0);
	player2->setPos(46.0, 45.0, 59.0);


	playerList.push_back(*player1);
	playerList.push_back(*player2);



	cout<<player1->getID(*player1)<<endl;
	playerList[0].showPos();
	cout<<player2->getID(*player2)<<endl;
	playerList[1].showPos();

	delete player2;
	delete player1;
	delete base;
	return 0;
}